/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package pl.edu.amu.wmi.kino.visualjavafx.model.generators;

import java.awt.Color;
import java.util.ArrayList;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.Point;
import pl.edu.amu.wmi.kino.visualjavafx.model.objects.shapes.Polyline;

/**H and VCenterDelta are not set - default is 0,0
 *
 * @author Admin
 */
//TODO : Grzegorz : fill works - it closes the polyline and the closing line is invisible, it has no border...

public class ModelPolylineGenerator {
    public static Polyline generatePolyline(double rotation,double anchorX,double anchorY,
            double opacity,double borderWidth,Color borderColor,Color fill,ArrayList<Point> points){
        Polyline res = new Polyline();
        res.setRotation(rotation);
        res.setOpacity(opacity);
        res.setBorderWidth(borderWidth);
        res.setBorderColor(borderColor);
        res.setFillColor(fill);
        for(Point p : points){
            res.addPoint(p);
        }
        
        return res;

    }
}
